<template>
  <div class="home">
    <!-- 缓存机制 -->
    <keep-alive include="find,shareList,shareItem">
      <!-- 路由出口 -->
      <router-view></router-view>
    </keep-alive>
    <div>
      <van-tabbar
        active-color="red"
        placeholder
        route
        class="tabbar"
        v-if="$route.meta.needTab"
      >
        <van-tabbar-item to="/home/company">
          <template #default>
            <div>
              公司
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe63d;</i>
          </template>
        </van-tabbar-item>
        <van-tabbar-item to="/home/question">
          <template #default>
            <div>
              刷题
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe642;</i>
          </template>
        </van-tabbar-item>
        <van-tabbar-item to="/home/find">
          <template #default>
            <div>
              发现
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe646;</i>
          </template>
        </van-tabbar-item>
        <van-tabbar-item to="/home/my">
          <template #default>
            <div>
              我的
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe645;</i>
          </template>
        </van-tabbar-item>
      </van-tabbar>
    </div>
  </div>
</template>

<script>
export default {}
</script>

<style lang="less" scope>
.home {
  .iconfont {
    font-size: 28px;
  }
}
</style>
